<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class OrderRefundResource extends JsonResource
{
    public function toArray($request)
    {
	    $data = $this->resource;
	
	    return [
		    'id' => (int)$data->id,
		    'user_id' => (int)$data->user_id,
		    'order_id' => (int)$data->order_id,
		    'order_item_id' => (int)$data->order_item_id,
		    'refund_money' => $data->refund_money,
		    'type' => $data->type,
		    'reason' => $data->reason,
		    'parcel_status' => $data->parcel_status,
		    'proof_images' => $data->proof_images,
		    'is_checked' => (bool)$data->is_checked,
		    'created_at' => (string)$data->created_at,
	    ];
    }
}
